let user = {
    name: '张三',
    birth: '1990-01-01',
    info: {
        gender: '男',
        height: 180
    }
}

observe(user)

function firstName() {
    document.getElementById('firstName').textContent = `姓：${user.name[0]}`
}
function lastName() {
    document.getElementById('lastName').textContent = `名：${user.name.substring(1)}`
}
function age() {
    let now = new Date()
    let birth = new Date(user.birth)
    document.getElementById('age').textContent = `年龄：${now.getFullYear() - birth.getFullYear()}岁`
}

function height() {
    document.getElementById('height').textContent = `身高：${user.info.height}cm`
}
autoRun([firstName, lastName, age, height])